﻿<!--
Copyright (c) Microsoft Corporation.  All rights reserved.
-->
<!--
Use of this source code is subject to the terms of the Microsoft
premium shared source license agreement under which you licensed
this source code. If you did not accept the terms of the license
agreement, you are not authorized to use this source code.
For the terms of the license, please see the license agreement
signed by you and Microsoft.
THE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:controls="clr-namespace:Clarity.Phone.Controls"
					xmlns:system="clr-namespace:System;assembly=mscorlib"
					xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
					xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
					xmlns:tk="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
					mc:Ignorable="d" >

	
	<!-- QuickJumpGrid Styles & Templates -->
	<!-- TODO: Fix up styles for selector overlay. Probably could cleanup passing syles through to the tiles-->
	<Style x:Key="QuickJumpGridOverlayAlphaTextStyle" TargetType="TextBlock">
		<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
		<Setter Property="FontSize" Value="48"/>
		<Setter Property="Margin" Value="{StaticResource PhoneHorizontalMargin}"/>
	</Style>

	<Style x:Key="QuickJumpGridOverlayTextStyle" TargetType="TextBlock">
		<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
		<Setter Property="FontSize" Value="26.667"/>
		<Setter Property="Margin" Value="12,0,0,6"/>
	</Style>

	<Style TargetType="controls:QuickJumpGrid">
		<Setter Property="GroupHeaderTemplate">
			<Setter.Value>
				<DataTemplate>
					<Border Margin="0,6,0,6" Width="62" Height="62"  Background="{StaticResource PhoneAccentBrush}">
						<TextBlock Text="{Binding}" Style="{StaticResource PhoneTextExtraLargeStyle}" Margin="6,0,0,0" VerticalAlignment="Bottom" />
					</Border>
				</DataTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="OverlayBackground">
			<Setter.Value>
				<SolidColorBrush Color="Black" Opacity=".8" />
			</Setter.Value>
		</Setter>
		<Setter Property="OverlayTileBackground" Value="{StaticResource PhoneAccentBrush}" />
		<Setter Property="OverlayTileForeground" Value="{StaticResource PhoneForegroundBrush}" />
		<Setter Property="OverlayTileDisabledBackground" Value="{StaticResource PhoneChromeBrush}" />
		<Setter Property="OverlayTileDisabledForeground" Value="{StaticResource PhoneDisabledBrush}" />
		<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}" />
		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:QuickJumpGrid">
					<ScrollViewer x:Name="ScrollViewer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}">
						<ItemsPresenter/>
					</ScrollViewer>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="OverlayItemContainerStyle" TargetType="ListBoxItem">
		<Setter Property="BorderThickness" Value="6"/>
		<Setter Property="Projection">
			<Setter.Value>
				<PlaneProjection RotationX="-90" />
			</Setter.Value>
		</Setter>
		<Setter Property="CacheMode" Value="BitmapCache" />
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="HorizontalContentAlignment" Value="Left"/>
		<Setter Property="VerticalContentAlignment" Value="Bottom"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ListBoxItem">
					<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Disabled" />
							</VisualStateGroup>
							<VisualStateGroup x:Name="SelectionStates">
								<VisualState x:Name="Unselected"/>
								<VisualState x:Name="Selected" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:QuickJumpGridOverlay">
		<Setter Property="ItemContainerStyle" Value="{StaticResource OverlayItemContainerStyle}" />
		<Setter Property="AlphaNumericItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<tk:WrapPanel />
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<VirtualizingStackPanel Margin="0,0,18,0" />
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="AlphaNumericItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<Border Width="100" Height="100">
						<TextBlock Text="{Binding Key}" Style="{StaticResource QuickJumpGridOverlayAlphaTextStyle}" VerticalAlignment="Bottom"  />
					</Border>
				</DataTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<Grid Height="62" >
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="*"/>
						</Grid.ColumnDefinitions>

						<Image Source="{Binding Picture}" Stretch="None" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="7,0" />
						<TextBlock Grid.Column="1" Text="{Binding Title}" Style="{StaticResource QuickJumpGridOverlayTextStyle}" VerticalAlignment="Bottom"  />
					</Grid>
				</DataTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="Padding" Value="19,14,0,0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:QuickJumpGridOverlay">
					<ScrollViewer x:Name="ScrollViewer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}">
						<ItemsPresenter />
					</ScrollViewer>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>
